Fully automated control system for type 1 diabetes

ABSTRACT

An augmented, adaptive algorithm utilizing model predictive control (MPC) is developed for closed-loop glucose control in type 1 diabetes. A linear empirical input-output subject model is used with an MPC algorithm to regulate blood glucose online, where the subject model is recursively adapted, and the control signal for delivery of insulin and a counter-regulatory agent such as glucagon is based solely on online glucose concentration measurements. The MPC signal is synthesized by optimizing an augmented objective function that minimizes local insulin accumulation in the subcutaneous depot and control signal aggressiveness, while simultaneously regulating glucose concentration to a preset reference set point. The mathematical formulation governing the subcutaneous accumulation of administered insulin is derived based on nominal temporal values pertaining to the pharmacokinetics (time-course of activity) of insulin in human, in terms of its absorption rate, peak absorption time, and overall time of action. The MPC algorithm is also formulated to provide control action with an integral effect, and in essence minimizes overall drug consumption. When employed as a modulator in an automated integrated glucose-control system for type 1 diabetes, the control algorithm provides the system with self-learning capability that enables it to operate under unrestricted activity of the subject.

BACKGROUND

Type 1 diabetes is a chronic, life-threatening disease that is caused by failure of the pancreas to deliver the hormone insulin, which is otherwise made and secreted by the beta cells of the pancreatic islets of Langerhans. Insulin opens receptors on the cell surfaces, thereby regulating inflow of blood glucose, an essential cell nutrient. With the resulting absence of endogenous insulin, people with type 1 diabetes cannot regulate their blood glucose to euglycemic range without exogenous insulin administration. However, it is critical to provide accurate insulin dosing, so as to minimize and whenever possible eliminate low or high blood glucose levels. Both high glucose levels, known as hyperglycemia, and low glucose levels, known as hypoglycemia, can have debilitating and deleterious consequences. Hypoglycemia may result in a coma and can cause acute complications, including brain damage and paralysis. While severe hyperglycemia can also result in a coma, mild chronic hyperglycemia potentially results in long-term, deleterious, and even life-threatening complications, such as vascular disease, renal complications, vision problems, nerve degeneration, and skin disorders.

In practice, it has been necessary for people with type 1 diabetes to monitor their blood glucose and administer exogenous insulin several times a day in a relentless effort to maintain their blood glucose near euglycemic range. This is a demanding, painstaking regimen. Even those who successfully adhere to the regimen are burdened by it to varying degrees and often still struggle with maintaining good glycemic control. Those who do not follow a regimen are at risk for severe complications.

SUMMARY

It would be desirable to reduce the burdens associated with monitoring blood glucose levels and administering exogenous insulin, as well as to better regulate blood glucose levels of those with type 1 diabetes and avoid the complications of hyper- and hypoglycemic conditions. A disclosed closed-loop control system automatically commands delivery of insulin based on glucose measurements. Since slight overdosing of insulin is possible during online operation of such a system, an agent having a counter-regulatory effect to insulin action, such as a hormone known as glucagon, is also made available for delivery by the system.

In a disclosed automated control system for type 1 diabetes, an adaptive algorithm utilizing model predictive control (MPC) is employed. An input-output subject model is used in conjunction with the MPC algorithm to regulate blood glucose online, where the subject model is recursively adapted, and the delivery of insulin is based solely on online glucose concentration measurements. An MPC signal is synthesized by optimizing an objective function that regulates glucose concentration to a preset reference set point while simultaneously minimizing both the control signal aggressiveness and local insulin accumulation in the subcutaneous space or “depot” that receives the infused insulin. A mathematical formulation describing the subcutaneous accumulation of administered insulin is derived based on nominal temporal values pertaining to the pharmacokinetics (time-course of activity) of insulin in human, in terms of its absorption rate, peak absorption time, and overall time of action. The MPC algorithm also provides control action with an integral effect, and in essence minimizes overall drug consumption. The control algorithm provides the automated glucose-control system with self-learning capability that enables it to operate under unrestricted activity of the subject.

The subject model may be an empirical subject model, which may initially be constructed based on a system identification process performed on input-output data obtained from open-loop glycemic control of the subject. The controller may be further operative to generate the insulin control signal to provide a basal rate of delivery of insulin when the model-predictive control algorithm reveals no need for a corrective dose of insulin.

BRIEF DESCRIPTION OF THE DRAWINGS

The foregoing and other objects, features and advantages of the invention will be apparent from the following description of particular embodiments of the invention, as illustrated in the accompanying drawings in which like reference characters refer to the same parts throughout the different views. The drawings are not necessarily to scale, emphasis instead being placed upon illustrating the principles of the invention.

FIG. 1 is a block diagram of a fully automated control system for type 1 diabetes in accordance with the present invention;

FIG. 2 is a functional block diagram of a controller in the system of FIG. 1;

FIG. 3 is a flow diagram depicting the operation of the system of FIG. 1, including details of the operation of the controller of FIG. 2; and

FIG. 4 is a flow diagram depicting a particular implementation of a control step of FIG. 3.

DETAILED DESCRIPTION

FIG. 1 illustrates an automated control system 10 for regulating the blood glucose level of an animal subject (subject) 12, which may be a human. The subject 12 receives doses of insulin from a delivery device 14, which may be an infusion pump coupled by a catheter to a subcutaneous space of the subject 12 for example. As described below, the delivery device 14 may also deliver a counter-regulatory agent such as glucagon for more effective control of blood glucose level under certain circumstances. In the present description, reference is made to glucagon specifically, but it is to be understood that this is for convenience only and that other counter-regulatory agents may be used. For the delivery of both insulin and glucagon, the delivery device 14 is preferably a mechanically driven infusion mechanism having dual cartridges for insulin and glucagon respectively

A glucose sensor 16 is operatively coupled to the subject 12 to continually sample a glucose level of the subject 12. Sensing may be accomplished in a variety of ways. A controller 18 controls operation of the delivery device 14 as a function of a glucose level signal from the glucose sensor 16 and subject to user-provided parameters. One feature of the disclosed technique is its ability to perform without receiving explicit information regarding either meals that the subject 12 has ingested or any other “feedforward” information. One necessary user-provided initialization parameter is the weight of the subject 12. Another user-provided parameter is a “setpoint” which, as described below, establishes a target blood glucose level that the system 10 strives to maintain.

FIG. 2 shows a functional block diagram of the controller 18, specifically a high-level depiction of a control algorithm that is executed by software/firmware within the controller 18. As shown, a dose control signal u(t) is generated by an objective function optimizer 20 which receives as one input a setpoint signal r(t+k), which may be constant (independent of time). The dose control signal u(t) controls the operation of the insulin-glucagon delivery device (delivery device) 14 of FIG. 1. The input dose control signal u(t) is also provided to a subject model 22 which, as described in more detail below, explicitly models the response of the subject 12 to delivery of insulin and/or glucagon. The subject model 22 also receives an actual glucose level signal y(t) from sensor 16, and generates a predicted future glucose level signal ŷ(t+k|t) that is used in the operation of the objective function optimizer 18.

During operation, the dose control signal u(t) and actual glucose level signal y(t) are continually fed into the subject model 22, thereby internally updating the subject model 22 and generating updated output predictions ŷ(t+k|t). By comparison with desired future reference setpoint values r(t+k), the objective function optimizer 20 computes future error signals which are used to synthesize the dose control signal u(t) in an optimizing fashion based on a model predictive control (MPC) algorithm. An amount of insulin or glucagon corresponding to the input signal u(t) is physically administered to the subject 12 via the delivery device 14 and is also passed to the subject model 22. The glucose sensor 16 provides the latest measurement y(t) to complete the cycle, which is then executed anew.

The function of the subject model 22 is to predict future blood glucose levels based on current and past values of the signals u(t) and y(t). There are a variety of models that can be employed. The following describes one particular embodiment for the subject model.

An option for the subject model is one of an empirical form, which may be obtained by system identification performed on input-output data generated from open-loop glycemic control of the subject. The subject model could be of a single-Input single-output, auto-regressive moving average with exogenous input (ARMAX) structure, with the representation

A(z ⁻¹)y _(t) =z ^(−d) B(z ⁻¹)u _(t) +C(z ⁻¹)w _(t)  (1)

where u_(t) denotes the (input) insulin-glucagon doses, y_(t) denotes the (output) glucose concentration deviation from the reference set point, w_(t) is a white Gaussian noise sequence, d is the inherent system time-delay (dead-time), z⁻¹ plays the role of the unit delay shift operator, and the scalar polynomials A, B, C are given by

A(z ⁻¹)=1+a ₁ z ⁻¹ +a ₂ z ⁻² + . . . +a _(n) z ^(−n),

B(z ⁻¹)=b ₀ +b ₁ z ⁻¹ +b ₂ z ⁻² + . . . +b _(m) z ^(−m),

C(z ¹)=1+c ₁ z ⁻¹ +c ₂ z ⁻² + . . . +c _(p) z ^(−p).

The model's orders and delay may be determined beforehand from the offline system identification analysis. The identified model is then employed in the online integrated control system, except that the model parameters are not statically stipulated, but are dynamic (free), in the sense that they are recursively updated. Recursive (online) parameter estimation of a model such as (1) may be facilitated by re-writing the model in regressor form, namely as

y _(t)=θ^(T)ψ_(t) +w _(t),  (2)

where the regressor ψ_(t) and θ are respectively given by

ψ_(t) :=[−y _(t−1) . . . −y _(t−n) u _(t−d) . . . u _(t−d−m) w _(t−1) . . . w _(t−p)]^(T)

θ:=[a₁ . . . a_(n)b₀ . . . b_(m)c₁ . . . c_(p)]^(T)  (3)

With online parameter estimates packed in a time-varying version of vector θ, namely θ_(t), and the estimate w_(t):=y_(t)−ψ_(t) ^(T)θ_(t) used in ψ_(t), one popular recursive estimation scheme is the Extended Least Squares [13, 14], which follows the scheme

$\begin{matrix} {\theta_{t} = {\theta_{t - 1} + {\frac{P_{t - 1}\psi_{t}}{1 + {\psi_{t}^{T}P_{t - 1}\psi_{t}}}e_{t}}}} & (4) \\ {P_{t} = {P_{t - 1} - \frac{P_{t - 1}\psi_{t}\psi_{t}^{T}P_{t - 1}}{1 + {\psi_{t}^{T}P_{t - 1}\psi_{t}}}}} & (5) \end{matrix}$

where e_(t):=y_(t)−ψ_(t) ^(T)θ_(t−1), and P₀ is taken to be a positive definite matrix. Another option for recursive parameter estimation is the Recursive Maximum Likelihood estimation method, which is similar to the Extended Least Squares, except that φ_(t):=ψ_(t)/C(z⁻¹) is used in lieu of ψ_(t)[14]. Other recursive (online) parameter-estimation schemes may also be used, such as the Instrumental Variable method, the Gradient estimation method, or alternate versions of these estimators that use a forgetting factor, to mention but a few options known to those skilled in the art [14]. Regardless of the scheme used, the adaptive subject model can be used to make online predictions of glucose concentrations and can be inherently employed by the controller block in generating the control signal.

The function of the objective function optimizer 20 is to generate the insulin and glucagon control signals u(t) in an optimized fashion based in part on the predicted blood glucose levels ŷ(t+k|t) from the subject model 22. There are a variety of optimization techniques that can be used. The following describes one particular embodiment of the objective function optimizer 20, which is also referred to as the “controller block” in the following description. The embodiment described below uses a model-predictive control (MPC) strategy.

The controller block may use one or more of the many MPC strategies, which all (1) make use of a mathematical model to {\it predict} the output at future time instants (horizon), (2) compute the control signal that optimizes an objective function at each step, and (3) employ a receding horizon strategy [5, 8]. The latter aspect refers to repeatedly displacing the prediction horizon towards the future, while only applying the first control signal in the calculated sequence at each step.

One popular MPC algorithm, compatible with an ARMAX subject model, is the Generalized Predictive Control (GPC) algorithm, which optimizes the multi-stage quadratic cost function given by

$\begin{matrix} {J_{GPC} = {{\sum\limits_{k = N_{d}}^{N_{m}}\; {\delta_{k}{{C\left( {r_{t + k} - y_{t + k}} \right)}}^{2}}} + {\sum\limits_{k = 0}^{N_{u}}{\lambda_{k}\left( {\Delta \; u_{t + k}} \right)}^{2}}}} & (6) \end{matrix}$

where N_(d) and N_(m) are respectively the minimum and maximum (output) prediction costing horizon limits, N_(u) the control horizon bound, δ_(m) the weighting on prediction error, and λ_(n) the weighting on control signals. Some general guidelines in GPC implementation include (1) N_(d)≧d, since earlier outputs are not influenced by the current input signal, (2) the output horizon, N_(y):=N_(m)−N_(d), covering a substantial portion of the response rise time due to u(t|t), and (3) N_(y)≧N_(u), with N_(u)=0 or square horizons, i.e. N_(y)=N_(u), popularly enforced.

For control action with integral effect, predictor and control design are based on

A(z ⁻¹)y _(t) =z ^(−k) B(z ⁻¹)u _(t) +C(z ⁻¹)w _(t)/Δ  (7)

with the corresponding Diophantine separation identity given by

$\begin{matrix} {{\frac{C}{A\; \Delta} = {E_{k} + {z^{- k}\frac{F_{k}}{A\; \Delta}}}},} & (8) \end{matrix}$

where F_(k) is the remainder polynomial corresponding to the monic quotient polynomial E_(k), the former and latter of respective orders n and k−1 in z⁻¹, or specifically, F_(k)=f₀+f₁z⁻¹+ . . . +f_(n)z^(−n) and E_(k)=1+e₁z⁻¹+ . . . +e_(k−1)z^(−(k−1)). The best predictor ŷ_(t|t-k) is then defined to satisfy

y _(t) =ŷ _(t|t−k) +E _(k) w _(t),  (9)

which yields

Cŷ _(t+k|t) =G _(k) Δu _(t+k−d) +F _(k) y _(t),  (10)

where G_(k):=E_(k)B. Note that G_(k) is order (m+k−1) in z⁻¹, and can be written as G_(k)=g₀+g₁z⁻¹+ . . . +g_(m+k−1)z^(−(m+k−1)), with g₀=b₀, since E_(k) is monic ∀k. To implement the GPC algorithm, we re-write (10) as

$\begin{matrix} {{{C{\hat{y}}_{{t + k}t}} = {{\sum\limits_{i = 0}^{k - d}\; {g_{i}z^{- i}\Delta \; u_{t + k - d}}} + {\left( {G_{k} - {\sum\limits_{i = 0}^{k - d}{g_{i}z^{- i}}}} \right)\Delta \; u_{t + k - d}} + {F_{k}y_{t}}}},} & (11) \end{matrix}$

where the first term on the right-hand side contains the only k−d future-terms (containing the sought control signal) for any k. Taking N_(d)=d and N_(y)+1=N_(u)+1=: N, i.e. square prediction and control horizons of N steps, we apply (11) over k=d→(N_(y)+d), and pack term contributions in the matrix-form equation given by

$\begin{matrix} {{y = {{Gu} + {G^{\prime}u} + {Fy}_{t}}}{where}{y = {{\begin{bmatrix} {C{\hat{y}}_{{t + d}t}} \\ {C{\hat{y}}_{{t + d + 1}t}} \\ \vdots \\ {C{\hat{y}}_{{t + N + d - 1}t}} \end{bmatrix}_{N \times 1}G} = \begin{bmatrix} g_{0} & 0 & 0 & \cdots \\ g_{1} & g_{0} & 0 & \cdots \\ \vdots & \vdots & \vdots & 0 \\ g_{N - 1} & g_{N - 2} & \cdots & g_{0} \end{bmatrix}_{N \times N}}}{u = {{\begin{bmatrix} {\Delta \; u_{t}} \\ {\Delta \; u_{t + 1}} \\ \vdots \\ {\Delta \; u_{t + N - 1}} \end{bmatrix}_{N \times 1}G^{\prime}u} = \begin{bmatrix} {\left( {G_{d} - {\sum\limits_{i = 0}^{0}\; {g_{i}z^{- i}}}} \right)\Delta \; u_{t}} \\ {\left( {G_{d + 1} - {\sum\limits_{i = 0}^{1}\; {g_{i}z^{- i}}}} \right)\Delta \; u_{t + 1}} \\ \vdots \\ {\left( {G_{N + d - 1} - {\sum\limits_{i = 0}^{N - 1}\; {g_{i}z^{- i}}}} \right)\Delta \; u_{t + n - 1}} \end{bmatrix}_{N \times 1}}}{F = \begin{bmatrix} F_{d} \\ F_{d + 1} \\ \vdots \\ F_{N + d - 1} \end{bmatrix}_{N \times 1}}} & (12) \end{matrix}$

The last two quantities in (12) are available at time t, as they are either directly measurable or depend only on past measurements, and can be grouped into a vector f, leading to:

y=Gu+f  (13)

With δ_(m)=1 and λ_(n)=λ, (6) can be re-written as

J _(GPC)=(G+f−r)^(T)(G+f−r)+λu ^(T) u,  (14)

where r is the vector holding future set points as r=[Cr_(t+d)Cr_(t+d+1) . . . Cr_(t+N+d−1)]^(T). Further manipulation of (14) leads to

$\begin{matrix} {{{J_{GPC} = {{\frac{1}{2}u^{T}{Hu}} + {b^{T}u} + f_{0}}},{where}}{{{H = {2\left( {{G^{T}G} + {\lambda \; I}} \right)}};{b^{T} = {2\left( {f - r} \right)^{T}G}};{f_{0} = {\left( {f - r} \right)^{T}\left( {f - r} \right)}}},}} & (15) \end{matrix}$

The unconstrained vector u minimizing J_(GPC) can be found by inspection of (15), and is given by

u _(GPC) =−H ⁻¹ b=(G ^(T) G+λI)⁻¹ G ^(T)(r−f),  (16)

Since G^(T)G≧0, (16) gives a unique solution, provided λ>0. Only the first control move is of interest at t, namely

Δu _(t)=[1 0 0 . . . 0](G ^(T) G+λI)⁻¹ G ^(T)(r−f),  (17)

The control increment or move in (17) is thus zero if the current situation and desired outcome coincide, that is if r−f=0, as it should. Finally, to deal with non-square horizons, which would only be permissible for N_(u)<N_(y), G is replaced G_(Nu), where G_(Nu) is composed of the first N_(u)+1 columns of G, and u is replaced by u_(Nu), which contains the first N_(u)+1 elements of u, with everything else kept the same. Note that the Generalized Minimum Variance (GMV) control, with N_(y)=N_(u)=N−1=0, is a special instance of GPC with square horizons.

In the case of subcutaneous drug administration, drug accumulation in the subcutaneous depot (typically that of insulin) can be augmented to the raw control cost function of (6), and viewed as an additional control objective in the optimization process. The resultant online control signal simultaneously (1) optimizes the controller's aggressiveness, (2) minimizes insulin accumulation in the subcutaneous depot, and (3) regulates glucose concentration to a preset set point target value. The mathematical formulation governing the subcutaneous accumulation of administered insulin can be derived based on nominal temporal values pertaining to its pharmacokinetics (time-course of activity), in terms of its absorption rate, peak absorption time, and overall time of action (perfusion into plasma). If p(t) is the concentration, in mU/dl, of the drug in plasma as it is absorbed from the subcutaneous depot, its evolution can be taken to be governed by

p(t)=KU ₀(e ^(−α) ¹ ^(t) −e ^(−α) ² ^(t)),  (18)

where U₀ is the subcutaneous-drug impulse dose in units (U), and K, α₁, and α₂ are positive constants. A measure of the pending effect of the accumulated amount of insulin in the SC depot can be taken to be the difference between the total area (∫₀ ^(∞) p(t)dt, i.e. a measure of the total action over time due to dose U₀) and ∫₀ ^(t) p(t)dt, i.e. a measure of the expended portion of U₀. With the measure of the lingering effect of the outstanding quantity of insulin in the SC depot denoted by q(t), we arrive at

$\begin{matrix} {{{q(t)}:={{{\int_{0}^{\infty}{{p(t)}\ {t}}} - {\int_{0}^{t}{{p(t)}\ {t}}}} = {\frac{{KU}_{0}}{\alpha_{1}\alpha_{2}}\left( {{\alpha_{2}^{{- \alpha_{1}}t}} - {\alpha_{1}^{{- \alpha_{2}}t}}} \right)}}},} & (19) \end{matrix}$

As a discrete-time model, this can be written as

$\begin{matrix} {{q_{k} = {{{\left( {^{{- \alpha_{1}}T_{s}} + ^{{- \alpha_{2}}T_{s}}} \right)q_{k - 1}} - {^{{- {({\alpha_{1} + \alpha_{2}})}}T_{s}}q_{k - 2}} + {\frac{K}{\alpha_{1}\alpha_{2}}\left( {\alpha_{2} - \alpha_{1}} \right)u_{k - d_{q}}} + {\frac{K}{\alpha_{1}\alpha_{2}}\left( {{\alpha_{1}^{{- \alpha_{1}}T_{s}}} - {\alpha_{2}^{{- \alpha_{2}}T_{s}}}} \right)u_{k - d_{q} - 1}}} = {:{{{- a_{1\; q}}q_{k - 1}} - {a_{2\; q}q_{k - 2}} + {b_{1\; q}u_{k - d_{q}}} + {b_{2\; q}u_{k - d_{q} - 1}}}}}},} & (20) \end{matrix}$

where T_(s) is the sampling period. Incidentally, IV dosing may be perceived as bypassing the SC depot, i.e., for an IV drug dose, q(t)=0 in (19) and q_(k)=0 in (20), as if there were zero peak (α₂→∞) and zero depletion or consumption times (α₁→∞) from the SC depot into plasma, with coinciding values for α₁ and α₂. Before augmenting (20) to the original discrete-time model of (1), whose inherent units are mg/dl, we non-dimensionalize (20) and re-scale it to switch its inherent units from mU\,min/dl to mg/dl, so that control signal computation (optimization) is performed on an overall homogenous (augmented) system. An overall scaling factor to operate on (20) can be obtained from the steady-state effect of an impulse dose on blood glucose, taken to vary as per a scaled integration of (18). As such, the scaling factor,

${s_{f} = \frac{y_{\infty}\alpha_{1}\alpha_{2}}{U_{0}{K\left( {\alpha_{2} - \alpha_{1}} \right)}}},$

in mg/(mU min), where y_(∞) is the steady-state excursion (offset from reference) in blood glucose per unit impulse dose U₀, can be used. Note that the scaling factor s_(f) provides the proper unit conversion, but can be scaled further by a unitless factor. The steady-state blood-glucose value, y_(∞), can be approximated from the pharmacodynamics of insulin, which is available in the literature. Augmenting the scaled q_(k)-system of (20) to the original y_(k)-system of (1), we obtain the single-input multiple-output model given by

A(z ⁻¹)y _(k) =z ^(−d) B(z ⁻¹)u _(k) +C(z ⁻¹)w _(k),  (21)

where y_(k)=[y_(k) s_(f)q_(k)]^(T), w_(k) is a vector of two white-noise sequences, and

A(z ⁻¹)=I _(2×2) +A ₁ z ⁻¹ +A ₂ z ⁻² + . . . +A _(n) z ^(−n),

B(z ⁻¹)=B ₀ +B ₁ z ⁻¹ +B ₂ z ⁻² + . . . +B _(m) z ^(−m),

C(z ¹)=I _(2×2) +C ₁ z ⁻¹ +C ₂ z ⁻² + . . . +C _(p) z ^(−p).

with

${A_{1} = \begin{bmatrix} a_{1} & 0 \\ 0 & a_{1\; q} \end{bmatrix}},{A_{2} = \begin{bmatrix} a_{i} & 0 \\ 0 & a_{2\; q} \end{bmatrix}},{A_{i} = {\begin{bmatrix} a_{i} & 0 \\ 0 & 0 \end{bmatrix}{\forall{i > 2}}}},{B_{0} = \begin{bmatrix} b_{0} \\ {s_{f}b_{1\; q}} \end{bmatrix}},{B_{1} = \begin{bmatrix} b_{0} \\ {s_{f}b_{2\; q}} \end{bmatrix}},{B_{i} = {\begin{bmatrix} b_{i} \\ 0 \end{bmatrix}{\forall{i > 1}}}},{C_{i} = {\begin{bmatrix} c_{i} & 0 \\ 0 & 0 \end{bmatrix}{\forall{i > 0}}}},$

where, for simplicity, the same system delay d of (1) can be assumed between q_(k) and u_(k). Coupling between the two systems, via the same input signal, is relevant when solving for the optimal control signal [5], whereby matrix G is merely extended to give an analogous matrix, G_(e), for the new system, the latter constructed as:

$G_{e} = \begin{bmatrix} g_{0} & 0 & 0 & \cdots \\ g_{0\; q} & 0 & 0 & \cdots \\ g_{1} & g_{0} & 0 & \cdots \\ g_{1\; q} & g_{0\; q} & 0 & \cdots \\ \vdots & \vdots & \vdots & 0 \\ g_{N - 1} & g_{N - 2} & \cdots & g_{0} \\ g_{{({N - 1})}_{q}} & g_{{({N - 2})}_{q}} & \cdots & g_{0\; q} \end{bmatrix}_{2\; N \times N}$

where the g_(iq)-entries pertain to the q_(k)-system and are the analogues of the g_(i)-entries in the y_(k)-system. Vector f is also adjusted accordingly to yield an extended version, f_(e), which is twice in length. A relative scaling (penalty) between outputs y_(k) and q_(k) can be accommodated in the construction of f. The GPC signal is again given by (17), except that G_(e) (or its first N_(u)+1 columns for non-square horizons) and f are used in lieu of G and f respectively, in addition to using a trivially extended version, r_(e), for r. The GMV control is recovered by setting N_(y)=N_(u)=N−1=0.

The following describes the use of constraints on the control signals u(t):

Constraints on input-output signals may be enforced to limit them to allowable, possibly subjective, fields of action. The output constraints are not usually explicitly contemplated, but rather implicitly enforced via optimizing the cost function [5]. In general, the input constraints can be described by

u_(min)≦u_(t)≦u_(max)

Δu_(min)≦Δu_(t)<Δu_(max),

Input constraints, such as minimum (basal) and maximum (bolus) doses, or their respective rate of change, may be explicitly enforced, possibly by saturation or clipping. The input constraints may be left for the user to initialize, but may at the same time be stipulated to be less than (and occasionally clipped or overridden by) a maximum allowable value, possibly based on the subject's weight.

FIG. 3 illustrates the overall process by which the system 10 of FIG. 1 operates. In step 24, the glucose level of the subject 12 is continually sensed by the glucose sensor 16, which generates a corresponding actual glucose level signal y(t). In step 26, the delivery device 14 operates in response to the insulin/glucagon dose control signal u(t) to deliver corresponding doses of insulin and glucagon to a subcutaneous space of the subject 12.

In step 28, the controller 18 generates the insulin/glucagon dose control signal u(t) as a function of the weight of the subject 12, the setpoint r(t+k), and time-varying glucose levels of the subject 12 as represented by the actual glucose level signal y(t) over time. Specifically, the controller 18 employs a control algorithm including steps 30 and 32 as shown.

In step 30, a subject model 16 is utilized to explicitly model response of the subject 12 to delivered doses of insulin and glucagon and thereby generate, based on time-varying values of the actual glucose level signal y(t) and the insulin/glucagon dose control signal u(t), a predicted glucose level signal ŷ(t+k|t) representing a predicted glucose level of the subject.

In step 32, the insulin and glucagon dose control signals u(t) are generated based on (a) a difference between the predicted glucose level signal ŷ(t+k|t) and the setpoint signal r(t+k) representing desired future levels of the glucose level of the subject 12, and (b) local accumulation of insulin in the subcutaneous space of the subject 12. This latter value is tracked according to the pharmacokinetics of insulin as described above.

FIG. 4 illustrates a particular implementation of the general step 32 of FIG. 3. In particular, the illustrated embodiment utilizes an MPC control strategy as described above. In step 34, the insulin/glucagon control signal u(t) is generated as optimizing an objective function with objectives of (a) a weighted integration of a difference between the actual glucose level signal y(t) and a predetermined setpoint value over a time horizon, and (b) a weighted integration of the insulin/glucagon control signal u(t) over the time horizon.

In step 36, the model parameters of the subject model 22 are recursively and continually updated to dynamically adapt the subject model 22 to variations in the response of the subject 12 to the delivered doses of insulin and glucagon.

It will be appreciated that the present invention may be embodied as an overall system such as shown in FIG. 1, as an overall method, as a controller such as shown in FIG. 2, and as a method performed by a controller such as shown in FIG. 4. With respect to the method performed by a controller, the method may be performed by computer program instructions executed by generic controller hardware including memory, a processing or execution unit, and input/output circuitry. The instructions may be provided to the controller from a computer-readable medium such as semiconductor memory, magnetic memory (e.g. magnetic disk), optical memory (e.g. optical disk such as CD, DVD), etc.

While this invention has been particularly shown and described with references to preferred embodiments thereof, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention as defined by the appended claims. 

1. A system for automatic control of blood glucose level of a subject, comprising: a glucose sensor operative to continually sense a glucose level of the subject and generate a corresponding glucose level signal; a delivery device operative to deliver doses of insulin to the subject in response to an insulin dose control signal; and a controller operative to generate the insulin dose control signal as a function of the weight of the subject and time-varying glucose levels of the subject as represented by the glucose level signal over time, the controller employing a control algorithm including: generating the insulin dose control signal based on (a) the glucose level signal, and (b) accumulation of insulin in the subject due to finite rate of utilization.
 2. A system according to claim 1 wherein the controller is further operative to generate the insulin dose control signal to provide a basal rate of delivery of insulin when the control algorithm reveals no need for a dose of insulin that exceeds a basal rate of delivery.
 3. A system according to claim 2 wherein the basal rate is determined by a user-provided basal-rate value.
 4. A system according to claim 3 wherein the controller employs a default basal-rate value based on the weight of the subject when the user-provided basal-rate value is either absent or greater than a predetermined maximum allowable value.
 5. A system according to claim 4 wherein the controller adapts the basal rate online based on the glucose level signal over time.
 6. A system according to claim 5 wherein the controller is operative to automatically impose respective constraints on the insulin dose control signal corresponding to a maximum allowable dose of insulin.
 7. A system according to claim 1 wherein the glucose sensor is integrated with the delivery device.
 8. A system according to claim 7 wherein the delivery device comprises a mechanically driven infusion mechanism and a cartridge for insulin.
 9. A system according to claim 1, wherein delivery by the delivery device is to a subcutaneous space in the subject.
 10. A system according to claim 1, wherein: the delivery device is further operative to deliver doses of a counter-regulatory agent to the subject in response to a counter-regulatory-agent dose control signal; and the controller is further operative to generate the counter-regulatory-agent dose control signal as a function of the weight of the subject and the time-varying glucose levels of the subject as represented by the glucose level signal over time.
 11. A system according to claim 10 wherein the counter-regulatory agent comprises glucagon.
 12. A system according to claim 10 wherein generating the counter-regulatory-agent dose control signal accounts for accumulation in the subject from past doses of the counter-regulatory agent.
 13. A system according to claim 1 wherein the generating of the insulin dose control signal based on the accumulation of insulin in the subject provides a controlling effect on aggressiveness of the control algorithm.
 14. A system according to claim 1 wherein generating the insulin dose control signal is performed based on a combination of one or more first mathematical expressions of a relationship between the insulin dose control signal and the glucose level signal and one or more second mathematical expressions of an estimation of the accumulation of insulin in the subject based on the insulin dose control signal.
 15. A system according to claim 14 wherein generating the insulin dose control signal based on the glucose level signal includes scaled summations of past and ongoing components of the insulin dose control signal and the glucose level signal, and wherein the estimation of the accumulation of insulin in the subject is obtained based on a scaled summation of accumulation contributions based on the insulin dose control signal, including past, ongoing, and/or future components of the insulin dose control signal.
 16. A system according to claim 14 wherein the estimation of the accumulation of insulin in the subject is obtained by feedback of the insulin dose control signal.
 17. A system according to claim 14 wherein the first and second mathematical expressions are used to obtain a control objective.
 18. A method for automatic control of the blood glucose level of a subject, comprising: continually sensing a glucose level of the subject and generating a corresponding glucose level signal; operating a delivery device to deliver doses of insulin to the subject in response to an insulin dose control signal; and generating the insulin dose control signal as a function of the weight of the subject and time-varying glucose levels of the subject as represented by the glucose level signal over time, by a control algorithm including: generating the insulin dose control signal based on (a) the glucose level signal, and (b) accumulation of insulin in the subject due to finite rate of utilization.
 19. A method according to claim 18 further comprising generating the insulin dose control signal to provide a basal rate of delivery of insulin when the control algorithm reveals no need for a dose of insulin that exceeds a basal rate of delivery.
 20. A method according to claim 19 wherein the basal rate is determined by a user-provided basal-rate value.
 21. A method according to claim 20 wherein a default basal-rate value based on the weight of the subject is employed when the user-provided basal-rate value is either absent or greater than a predetermined maximum allowable value.
 22. A method according to claim 21 wherein the basal rate is adapted online based on the glucose level signal over time.
 23. A method according to claim 22 further comprising automatically imposing constraints on the insulin dose control signal corresponding to a maximum allowable dose of insulin.
 24. A method according to claim 18 wherein delivery by the delivery device is to a subcutaneous space in the subject.
 25. A method according to claim 18 further comprising: operating the delivery device to deliver doses of a counter-regulatory agent to the subject in response to a counter-regulatory-agent dose control signal; and generating the counter-regulatory-agent dose control signal as a function of the weight of the subject and the time-varying glucose levels of the subject as represented by the glucose level signal over time.
 26. A method according to claim 25 wherein generating the counter-regulatory-agent dose control signal accounts for accumulation in the subject from past doses of the counter-regulatory agent.
 27. A method according to claim 25 wherein the counter-regulatory agent comprises glucagon.
 28. A method according to claim 18 wherein the generating of the insulin dose control signal based on (b) accumulation of insulin in the subject provides a controlling effect on aggressiveness of the control algorithm.
 29. A method according to claim 18 wherein generating the insulin dose control signal is performed based on a combination of one or more first mathematical expressions of a relationship between the insulin dose control signal and the glucose level signal and one or more second mathematical expressions of an estimation of the accumulation of insulin in the subject based on the insulin dose control signal.
 30. A method according to claim 29 wherein the relationship between the insulin dose control signal and the glucose level signal includes scaled summations of past and ongoing components of the insulin dose control signal and the glucose level signal, and wherein the estimation of the accumulation of insulin in the subject is obtained based on a scaled summation of accumulation contributions based on the insulin dose control signal, including past, ongoing, and/or future components of the insulin dose control signal.
 31. A method according to claim 29 wherein the estimation of the accumulation of insulin in the subject is obtained by feedback of the insulin dose control signal.
 32. A method according to claim 29 wherein the first and second mathematical expressions are used to obtain a control objective.
 33. A controller for use in a system for automatic control of blood glucose level of a subject, the controller being operative to generate an insulin dose control signal as a function of the weight of the subject and time-varying glucose levels of the subject as represented by an glucose level signal over time, the glucose level signal being generated by a glucose sensor operative to continually sense a glucose level of the subject, the insulin dose control signal controlling the delivery of doses of insulin to the subject by a delivery device, the controller employing a control algorithm including: generating the insulin dose control signal based on (a) the glucose level signal, and (b) accumulation of insulin in the subject due to finite rate of utilization. 